import { defineStore } from 'pinia'

export const useSettingStore = defineStore({
  id: 'setting',
  state: () => {
    return {
      // 是否显示顶部导航栏
      isNavbar: false,
      // 导航 title
      title: ''
    }
  },
  getters: {
    getNavbar(state) {
      return state.isNavbar
    },
    getTitle(state) {
      return state.title
    }
  },
  actions: {
    setNavbar(type) {
      this.isNavbar = type
    },
    setTitle(title) {
      this.title = title
    }
  },

})

export default useSettingStore
